home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Add-On
/
Workbench Add-On - Volume 1.iso
/
BBS-Archive
/
Comm
/
AmiTCP30b2.lha
/
bin
/
SynClock
< prev
next >
Wrap
AmigaDOS Script File
|
1993-11-08
|
665b
|
31 lines
.KEY HOST/A,SAVE/S
.BRA {
.KET }
; $VER: SynClock 2.1 (8.11.1993)
; Set your amiga clock from host in network.
; if someone finds a way to get DAY
; locale (in)dependent way, (and fast)
; please tell me (too@cs.hut.fi)
Assign >NIL: TCP: exists
if warn
echo TCP: not mounted.
quit 10
endif
rx "Address 'COMMAND'; months='JanFebMarAprMayJunJulAugSepOctNovDec' +
If ~Open(dt, 'TCP:{HOST}/daytime', 'R') Then +
Do; Say '*** Service not present'; Exit 10; End +
d = readln(dt) +
tim = SubWord(d, 4, 1) +
month=(Pos(SubWord(d, 2, 1), months) + 2) / 3 +
Date TIME tim DATE SubWord(d, 3, 1)'-'month'-'SubStr(d, 23, 2)
If {SAVE}
SetClock SAVE
EndIf